home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Mathematics / Notebooks / COSY_PAK / COSY_Notes / 04_Steady_State_Response.ma < prev    next >
Encoding:
Text File  |  1992-06-09  |  12.5 KB  |  343 lines

  1. (*^
  2.  
  3. ::[paletteColors = 128; showRuler; currentKernel; 
  4.     fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, L1, e8,  28, "Times"; ;
  5.     fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, L1, e6,  22, "Times"; ;
  6.     fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, L1, e6,  16, "Times"; ;
  7.     fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, L1, a20,  22, "Times"; ;
  8.     fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, L1, a15,  16, "Times"; ;
  9.     fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, L1, a12,  14, "Times"; ;
  10.     fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  14, "Times"; ;
  11.     fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  12.     fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, L1,  14, "Courier"; ;
  13.     fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23,  14, "Courier"; ;
  14.     fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  14, "Courier"; ;
  15.     fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  14, "Courier"; ;
  16.     fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  14, "Courier"; ;
  17.     fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L1,  14, "Courier"; ;
  18.     fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12, "Times"; ;
  19.     fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  14, "Times"; ;
  20.     fontset = Left Header, inactive, nohscroll, preserveAspect, L1,  14, "Times"; ;
  21.     fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1,  14, "Times"; ;
  22.     fontset = Left Footer, inactive, nohscroll, preserveAspect, center, L1,  14, "Times"; ;
  23.     fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  24.     fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  14, "Times"; ;
  25.     fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  14, "Courier"; ;
  26.     fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  14, "Times"; ;
  27.     fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  14, "Times"; ;
  28.     fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  14, "Times"; ;
  29.     fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  14, "Times"; ;
  30.     fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  14, "Times"; ;]
  31. :[font = title; inactive; preserveAspect; rightWrapOffset = 526; fontColorBlue = 65535; ]
  32.  
  33. COSY_PAK
  34. Control Systems Analysis Package
  35.   for Mathematica 
  36. ;[s]
  37. 3:0,0;49,1;60,2;62,-1;
  38. 3:1,25,19,Times,1,28,0,0,0;1,26,20,Times,3,28,0,0,0;1,25,19,Times,1,28,0,0,0;
  39. :[font = subtitle; inactive; preserveAspect; rightWrapOffset = 526; ]
  40.  
  41. By
  42.  C.K. Chen              N. Sreenath 
  43.   1992
  44.        
  45. :[font = message; inactive; preserveAspect; center; rightWrapOffset = 526; fontName = "Courier"; ]
  46. Systems Engineering Department
  47. Case School of Engineering
  48. Case Western Reserve University
  49. Cleveland, OH, 44106-7070
  50. :[font = message; inactive; dontPreserveAspect; center; rightWrapOffset = 526; ]
  51.  
  52.  
  53. with support from
  54. CWRU Information and Network Services - Dr. Ray Neff
  55. Case Alumni Association
  56. The Lilly Foundation
  57. :[font = input; preserveAspect; rightWrapOffset = 526; ]
  58.  
  59.                 
  60.  
  61.  
  62. :[font = subtitle; inactive; preserveAspect; leftWrapOffset = 23; rightWrapOffset = 526; ]
  63. Chapter 4 
  64. Steady-State Response 
  65. :[font = section; inactive; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  66. Initialization
  67. :[font = input; initialization; preserveAspect; rightWrapOffset = 526; ]
  68. *)
  69. (* Initialization of Path *)
  70.  
  71. (* Example For UNIX machine  (Default) *)   
  72.  
  73. $Path=Join[$Path,
  74.     {"~/Library/Mathematica/Packages"}];
  75.  
  76.  
  77. (* Example For IBM PC          *)
  78. (*
  79. $Path=Join[$Path,    
  80.      {"c:\winmath\packages"}];     
  81. *)     
  82.  
  83. (* Example For MAC          *)
  84. (*
  85. $Path=Join[$Path,    
  86.      {"My_Harddisk:Mathematica:Package"}];     
  87. *)     
  88. (*
  89. :[font = input; initialization; preserveAspect; rightWrapOffset = 526; endGroup; ]
  90. *)
  91. Needs["COSYPAK`chap4`"]
  92. (*
  93. :[font = section; inactive; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  94. Acknowledgements
  95. :[font = text; inactive; preserveAspect; rightWrapOffset = 526; endGroup; ]
  96. Special thanks to Brian Evans of Georgia Tech for the LaPlace transform and signal packages which is a part of the Signal Processing Packages :Copyright: Copyright 1989-1991 by Brian L. Evans, Georgia Tech Research Corporation.
  97. :[font = section; inactive; Cclosed; preserveAspect; rightWrapOffset = 526; fontColorBlue = 65535; startGroup; ]
  98. Routh's Stability Criterion
  99. :[font = text; inactive; preserveAspect; rightWrapOffset = 526; ]
  100.  
  101. Routh's stability criterion indicates the presence of positive roots (roots with real part positive)  or unstable poles in a polynomial equation. Routh's criterion gives only the number of positive roots and not the actual roots.
  102.  
  103. COSI_PAK Function
  104. Routh[Charpoly, s, z]: Gives the Routh's table for application of Routh's stability criterion. The parameter Charpoly is the characteristic polynomial with variable s. The parameter z define the symbol to replace the zero value of first column terms if any. The characteristic polynomial is the denominator of the transfer function. Returns Routh's table as an array.
  105. ;[s]
  106. 7:0,0;232,1;249,2;250,3;272,4;359,5;367,6;618,-1;
  107. 7:1,13,10,Times,0,14,0,0,0;1,12,9,Times,1,14,0,0,0;1,13,10,Times,2,14,0,0,0;1,12,9,Times,1,14,0,0,0;1,13,10,Times,0,14,0,0,0;1,12,9,Times,1,14,0,0,0;1,13,10,Times,0,14,0,0,0;
  108. :[font = subsection; inactive; preserveAspect; rightWrapOffset = 526; ]
  109. Examples
  110. :[font = subsubsection; inactive; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  111. 1. Find the stability of the characteristic equation 
  112.                 s^4 + 3 s^3 + 3 s^2 + 2 s + k
  113.   as a function of parameter k using Routh's Stability   Criterion.
  114. :[font = input; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  115.  
  116. poly = s^4 + 3 s^3 + 3 s^2 + 2 s + k;
  117. results = Routh[poly,s,zero];
  118.  
  119. :[font = print; inactive; preserveAspect; rightWrapOffset = 526; endGroup; ]
  120. The Routh's Table:
  121.  
  122.  
  123.  
  124. 1         3         k
  125.  
  126.  
  127.  
  128. 3         2         0
  129.  
  130. 7
  131. -
  132. 3         k         0
  133.  
  134.     9 k
  135. 2 - ---
  136.      7    0         0
  137.  
  138.  
  139.  
  140. k         0         0
  141.  
  142. The first column of the Routh's table is: 
  143.  
  144.        7      9 k
  145. {1, 3, -, 2 - ---, k}
  146.        3       7
  147.  
  148. :[font = text; inactive; preserveAspect; rightWrapOffset = 526; endGroup; ]
  149. If k is negative then there is one sign change between the fourth row and the fifth row indicating an unstable pole.
  150.  
  151. On the other hand if k is positive and less than 
  152.               2*7/9
  153. then there are no unstable poles. If k > 1.555 there will be two unstable poles. 
  154.  
  155. What will happen if k=1.5555 ? Substitute this value of k and re-evaluate to fine out.
  156. :[font = subsubsection; inactive; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  157. 2.  Note that the characteristic polynomial is = s^3 - 3s +2
  158. :[font = input; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  159. poly = s^3 - 3s +2;
  160. results =Routh[poly,s,zero];
  161. :[font = print; inactive; preserveAspect; rightWrapOffset = 526; ]
  162. The Routh's Table:
  163.  
  164.  
  165.  
  166. 1           -3
  167.  
  168.  
  169.  
  170. zero        2
  171.  
  172.       2
  173. -3 - ----
  174.      zero   0
  175.  
  176.  
  177.  
  178. 2           0
  179.  
  180. The first column of the Routh's table is: 
  181.  
  182.                 2
  183. {1, zero, -3 - ----, 2}
  184.                zero
  185.  
  186. :[font = text; inactive; preserveAspect; rightWrapOffset = 526; endGroup; endGroup; ]
  187. Assuming that the variable zero is a small positive number (e.g. zero=0.001) we see that there are two sign changes indicating two unstable (real part positive) poles.
  188. :[font = subsubsection; inactive; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  189. 3. Find the stability of the characteristic equation 
  190.               s^5 + 2 s^4 + 24 s^3 + 48 s^2 -25 s -50 =0
  191.     using Routh's Stability  Criterion.
  192. ;[s]
  193. 4:0,0;68,1;107,2;112,3;150,-1;
  194. 4:1,12,9,Times,1,14,0,0,0;1,11,9,Courier,1,14,0,0,0;1,10,8,Times,1,12,0,0,0;1,12,9,Times,1,14,0,0,0;
  195. :[font = input; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  196. poly = s^5 + 2 s^4 + 24 s^3 + 48 s^2 -25 s -50;
  197. results =Routh[poly,s,zero];
  198. :[font = print; inactive; preserveAspect; rightWrapOffset = 526; endGroup; endGroup; ]
  199. The Routh's Table:
  200.  
  201.  
  202.  
  203. 1         24        -25
  204.  
  205.  
  206.  
  207. 2         48        -50
  208.  
  209.  
  210.  
  211. zero      0         0
  212.  
  213.  
  214.  
  215. 48        -50       0
  216.  
  217. 25 zero
  218. -------
  219.   24      0         0
  220.  
  221.  
  222.  
  223. -50       0         0
  224.  
  225. The first column of the Routh's table is: 
  226.  
  227.                  25 zero
  228. {1, 2, zero, 48, -------, -50}
  229.                    24
  230.  
  231. Sign Change!! Unstable root(s) exist.
  232. :[font = subsubsection; inactive; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  233. 4. Is the system with the following characteristic polynomial  stable ? 
  234.               s^5 + 2 s^4 + 24 s^3 + 48 s^2 -25 s -50 
  235. ;[s]
  236. 3:0,0;87,1;126,2;128,-1;
  237. 3:1,12,9,Times,1,14,0,0,0;1,11,9,Courier,1,14,0,0,0;1,10,8,Times,1,12,0,0,0;
  238. :[font = input; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  239. poly = s^3 + 2 s^2 + s +2;
  240. results =Routh[poly,s,zero];
  241. :[font = print; inactive; preserveAspect; rightWrapOffset = 526; endGroup; ]
  242. The Routh's Table:
  243.  
  244. 1      1
  245.  
  246. 2      2
  247.  
  248. zero   0
  249.  
  250. 2      0
  251.  
  252. The first column of the Routh's table is: 
  253.  
  254. {1, 2, zero, 2}
  255.  
  256. :[font = text; inactive; preserveAspect; rightWrapOffset = 526; endGroup; ]
  257. Since the variable zero is a small positive number there are no sign changes, i.e., there are no positive poles.
  258. :[font = subsubsection; inactive; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  259. 5. Find the stability of the characteristic polynomial 
  260.                s^4 + 2 s^3 + k s^2 + 4 s +5
  261. :[font = input; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  262. poly = s^4 + 2 s^3 + k s^2 + 4 s +5;
  263. results =Routh[poly,s,zero];
  264. :[font = print; inactive; preserveAspect; rightWrapOffset = 526; ]
  265. The Routh's Table:
  266.  
  267.  
  268.  
  269. 1           k           5
  270.  
  271.  
  272.  
  273. 2           4           0
  274.  
  275.  
  276.  
  277. -2 + k      5           0
  278.  
  279. -18 + 4 k
  280. ---------
  281.  -2 + k     0           0
  282.  
  283.  
  284.  
  285. 5           0           0
  286.  
  287. The first column of the Routh's table is: 
  288.  
  289.                -18 + 4 k
  290. {1, 2, -2 + k, ---------, 5}
  291.                 -2 + k
  292.  
  293. :[font = text; inactive; preserveAspect; rightWrapOffset = 526; endGroup; endGroup; endGroup; ]
  294. If k is greater than 16/3 then there are positive poles.
  295. :[font = section; inactive; Cclosed; preserveAspect; rightWrapOffset = 526; fontColorBlue = 65535; startGroup; ]
  296. Steady State Error Analysis
  297. :[font = subsection; inactive; preserveAspect; rightWrapOffset = 526; startGroup; ]
  298. Error Constant
  299. :[font = text; inactive; preserveAspect; rightWrapOffset = 526; ]
  300.  
  301. mathematica Function
  302. Limit [ Function, Approaches ]:  Calculates the limit of the equation 'Function' for the variable and its value specified by 'Approaches'.
  303. ;[s]
  304. 7:0,0;1,1;12,2;21,3;22,4;53,5;55,6;160,-1;
  305. 7:1,13,10,Times,0,14,0,0,0;1,13,10,Times,2,14,0,0,0;1,12,9,Times,1,14,0,0,0;1,13,10,Times,0,14,0,0,0;1,12,9,Times,1,14,0,0,0;1,11,8,Times,0,12,0,0,0;1,13,10,Times,0,14,0,0,0;
  306. :[font = text; inactive; preserveAspect; rightWrapOffset = 526; ]
  307.  
  308. Example :
  309. ;[s]
  310. 3:0,0;1,1;9,2;11,-1;
  311. 3:1,11,9,Courier,0,14,0,0,0;1,11,9,Courier,1,14,0,0,0;1,10,8,Courier,0,12,0,0,0;
  312. :[font = input; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  313. g4 = wn^2 p/(s^2 + 2 damping wn s + wn^2)/(s+p)
  314.  
  315.  
  316. :[font = output; output; inactive; preserveAspect; rightWrapOffset = 526; ]
  317. (p*wn^2)/((p + s)*(s^2 + 2*damping*s*wn + wn^2))
  318. ;[o]
  319.                    2
  320.                p wn
  321. -----------------------------------
  322.           2                      2
  323. (p + s) (s  + 2 damping s wn + wn )
  324. :[font = input; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  325.  
  326. kp = Limit[g4,s->0]
  327. :[font = output; output; inactive; preserveAspect; rightWrapOffset = 526; endGroup; ]
  328. 1
  329. ;[o]
  330. 1
  331. :[font = input; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  332. kv = Limit[g4 s,s-> 0]
  333. :[font = output; output; inactive; preserveAspect; rightWrapOffset = 526; endGroup; ]
  334. 0
  335. ;[o]
  336. 0
  337. :[font = input; Cclosed; preserveAspect; rightWrapOffset = 526; startGroup; ]
  338. ka = Limit[g4 s^2, s->0]
  339. :[font = output; output; inactive; preserveAspect; rightWrapOffset = 526; endGroup; endGroup; endGroup; endGroup; ]
  340. 0
  341. ;[o]
  342. 0
  343. ^*)